home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / T / Think-Pascal-7.0.cpt / THINK Pascal Interfaces / Video.p < prev   
Encoding:
Text File  |  1991-04-05  |  5.8 KB  |  186 lines  |  [TEXT/PJMM]

  1. {    This file has been processed by The THINK Pascal Source Converter, v1.1.    }
  2.  
  3. {
  4. Created: Sunday, January 6, 1991 at 11:26 PM
  5.     Video.p
  6.     Pascal Interface to the Macintosh Libraries
  7.  
  8.         Copyright Apple Computer, Inc.    1986-1990
  9.         All rights reserved
  10. }
  11.  
  12.  
  13. {$IFC UNDEFINED UsingIncludes}
  14. {$SETC UsingIncludes := 0}
  15. {$ENDC}
  16.  
  17.  
  18.     UNIT Video;
  19.     INTERFACE
  20.     USES
  21.         Types, Quickdraw;
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35. CONST
  36. mBaseOffset = 1;            {Id of mBaseOffset.}
  37. mRowBytes = 2;              {Video sResource parameter Id's }
  38. mBounds = 3;                {Video sResource parameter Id's }
  39. mVersion = 4;               {Video sResource parameter Id's }
  40. mHRes = 5;                  {Video sResource parameter Id's }
  41. mVRes = 6;                  {Video sResource parameter Id's }
  42. mPixelType = 7;             {Video sResource parameter Id's }
  43. mPixelSize = 8;             {Video sResource parameter Id's }
  44. mCmpCount = 9;              {Video sResource parameter Id's }
  45. mCmpSize = 10;              {Video sResource parameter Id's }
  46. mPlaneBytes = 11;           {Video sResource parameter Id's }
  47. mVertRefRate = 14;          {Video sResource parameter Id's }
  48. mVidParams = 1;             {Video parameter block id.}
  49. mTable = 2;                 {Offset to the table.}
  50. mPageCnt = 3;               {Number of pages}
  51. mDevType = 4;               {Device Type}
  52.  
  53. oneBitMode = 128;           {Id of OneBitMode Parameter list.}
  54. twoBitMode = 129;           {Id of TwoBitMode Parameter list.}
  55. fourBitMode = 130;          {Id of FourBitMode Parameter list.}
  56. eightBitMode = 131;         {Id of EightBitMode Parameter list.}
  57. sixteenBitMode = 132;       {Id of SixteenBitMode Parameter list.}
  58. thirtyTwoBitMode = 133;     {Id of ThirtyTwoBitMode Parameter list.}
  59.  
  60. firstVidMode = 128;         {The new, better way to do the above.    }
  61. secondVidMode = 129;        {    QuickDraw only supports six video    }
  62. thirdVidMode = 130;         {    at this time.                        }
  63. fourthVidMode = 131;
  64. fifthVidMode = 132;
  65. sixthVidMode = 133;
  66.  
  67. spGammaDir = 64;
  68. spVidNamesDir = 65;
  69.  
  70. { Control Codes }
  71. cscReset = 0;
  72. cscKillIO = 1;
  73. cscSetMode = 2;
  74. cscSetEntries = 3;
  75. cscSetGamma = 4;
  76. cscGrayPage = 5;
  77. cscGrayScreen = 5;
  78. cscSetGray = 6;
  79. cscSetInterrupt = 7;
  80. cscDirectSetEntries = 8;
  81. cscSetDefaultMode = 9;
  82.  
  83. { Status Codes }
  84. cscGetMode = 2;
  85. cscGetEntries = 3;
  86. cscGetPageCnt = 4;
  87. cscGetPages = 4;            { This is what C&D 2 calls it. }
  88. cscGetPageBase = 5;
  89. cscGetBaseAddr = 5;         { This is what C&D 2 calls it. }
  90. cscGetGray = 6;
  91. cscGetInterrupt = 7;
  92. cscGetGamma = 8;
  93. cscGetDefaultMode = 9;
  94.  
  95. TYPE
  96. VPBlockPtr = ^VPBlock;
  97. VPBlock = RECORD
  98.     vpBaseOffset: LONGINT;  {Offset to page zero of video RAM (From minorBaseOS).}
  99.     vpRowBytes: INTEGER;    {Width of each row of video memory.}
  100.     vpBounds: Rect;         {BoundsRect for the video display (gives dimensions).}
  101.     vpVersion: INTEGER;     {PixelMap version number.}
  102.     vpPackType: INTEGER;
  103.     vpPackSize: LONGINT;
  104.     vpHRes: LONGINT;        {Horizontal resolution of the device (pixels per inch).}
  105.     vpVRes: LONGINT;        {Vertical resolution of the device (pixels per inch).}
  106.     vpPixelType: INTEGER;   {Defines the pixel type.}
  107.     vpPixelSize: INTEGER;   {Number of bits in pixel.}
  108.     vpCmpCount: INTEGER;    {Number of components in pixel.}
  109.     vpCmpSize: INTEGER;     {Number of bits per component}
  110.     vpPlaneBytes: LONGINT;  {Offset from one plane to the next.}
  111.     END;
  112.  
  113. VDEntRecPtr = ^VDEntryRecord;
  114. VDEntryRecord = RECORD
  115.     csTable: Ptr;           {(long) pointer to color table entry=value, r,g,b:INTEGER}
  116.     END;
  117.  
  118. { Parm block for SetGray control call }
  119. VDGrayPtr = ^VDGrayRecord;
  120. VDGrayRecord = RECORD
  121.     csMode: BOOLEAN;        {Same as GDDevType value (0=mono, 1=color)}
  122.     END;
  123.  
  124. { Parm block for SetEntries control call }
  125. VDSetEntryPtr = ^VDSetEntryRecord;
  126. VDSetEntryRecord = RECORD
  127.     csTable: ^ColorSpec;    {Pointer to an array of color specs}
  128.     csStart: INTEGER;       {Which spec in array to start with, or -1}
  129.     csCount: INTEGER;       {Number of color spec entries to set}
  130.     END;
  131.  
  132. { Parm block for SetGamma control call }
  133. VDGamRecPtr = ^VDGammaRecord;
  134. VDGammaRecord = RECORD
  135.     csGTable: Ptr;          {pointer to gamma table}
  136.     END;
  137.  
  138. VDPgInfoPtr = ^VDPageInfo;
  139. VDPageInfo = RECORD
  140.     csMode: INTEGER;        {(word) mode within device}
  141.     csData: LONGINT;        {(long) data supplied by driver}
  142.     csPage: INTEGER;        {(word) page to switch in}
  143.     csBaseAddr: Ptr;        {(long) base address of page}
  144.     END;
  145.  
  146. VDSzInfoPtr = ^VDSizeInfo;
  147. VDSizeInfo = RECORD
  148.     csHSize: INTEGER;       {(word) desired/returned h size}
  149.     csHPos: INTEGER;        {(word) desired/returned h position}
  150.     csVSize: INTEGER;       {(word) desired/returned v size}
  151.     csVPos: INTEGER;        {(word) desired/returned v position}
  152.     END;
  153.  
  154. VDSettingsPtr = ^VDSettings;
  155. VDSettings = RECORD
  156.     csParamCnt: INTEGER;    {(word) number of params}
  157.     csBrightMax: INTEGER;   {(word) max brightness}
  158.     csBrightDef: INTEGER;   {(word) default brightness}
  159.     csBrightVal: INTEGER;   {(word) current brightness}
  160.     csCntrstMax: INTEGER;   {(word) max contrast}
  161.     csCntrstDef: INTEGER;   {(word) default contrast}
  162.     csCntrstVal: INTEGER;   {(word) current contrast}
  163.     csTintMax: INTEGER;     {(word) max tint}
  164.     csTintDef: INTEGER;     {(word) default tint}
  165.     csTintVal: INTEGER;     {(word) current tint}
  166.     csHueMax: INTEGER;      {(word) max hue}
  167.     csHueDef: INTEGER;      {(word) default hue}
  168.     csHueVal: INTEGER;      {(word) current hue}
  169.     csHorizDef: INTEGER;    {(word) default horizontal}
  170.     csHorizVal: INTEGER;    {(word) current horizontal}
  171.     csHorizMax: INTEGER;    {(word) max horizontal}
  172.     csVertDef: INTEGER;     {(word) default vertical}
  173.     csVertVal: INTEGER;     {(word) current vertical}
  174.     csVertMax: INTEGER;     {(word) max vertical}
  175.     END;
  176.  
  177.  
  178.  
  179.     { UsingVideo }
  180.  
  181.  
  182.     IMPLEMENTATION
  183. END.
  184.  
  185.  
  186.